package com.yuyou.tas.lesson.service;

import com.yuyou.tas.lesson.vo.req.ReqAddOrUpdateClass;
import com.yuyou.tas.lesson.vo.req.ReqUpdateClassPlanChapter;
import com.yuyou.tas.service.api.feedback.vo.resp.FeedbackClassesVo;
import com.yuyou.tas.service.api.lesson.dto.*;
import com.yuyou.tas.service.api.lesson.entity.LessonClass;
import com.yuyou.tas.service.api.lesson.vo.LessonClassVo;
import com.yuyou.tas.util.bean.LoginRedisObj;
import com.yuyou.tas.util.bean.Pagination;
import com.yuyou.tas.util.bean.ResBoolSimpleInfo;

import java.util.List;


public interface ILessonClassService {
    int deleteByPrimaryKey(Long id);

    int insert(LessonClass record);

    LessonClass selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(LessonClass record);

    int addOrUpdateClass(ReqAddOrUpdateClass reqAddOrUpdateClass, LoginRedisObj loginObj) throws Exception;
    
    ResBoolSimpleInfo<String> upGradeClass(Long id,  Long organizationId)throws Exception;

    ResBoolSimpleInfo<String> deleteLessonClass(Long id);

    int findLessonClassPageCount(Pagination<LessonClassPageDTO> p);

    List<LessonClass> findByLessonId(Long lessonId);
    
    /**
     * 根据组织ID和oId查找班级
     * @param oId
     * @param authOrganizationId
     * @return
     */
    LessonClass selectByOrgan7OId(Long oId,Long authOrganizationId);
    
    List<LessonClassPageDTO> findLessonClassPageList(Pagination<LessonClassPageDTO> p);

    LessonClassDTO getLessonClass(Long lessonClassId);

    void updatePlanChapter(List<ReqUpdateClassPlanChapter> reqUpdateClassPlanChapterList);

    List<LessonClassPlanChapterDTO> lessonClassPlanChapterList(Long lessonClassId);
    
    ResBoolSimpleInfo<String> sycnClassByOId(List<LessonClassSyncDTO> list)throws Exception;
    
    ResBoolSimpleInfo<String> delByOrgan7OIds(List<Long> oIds,Long authOrganizationId);

	ResBoolSimpleInfo<String> delByOrgan7OId(Long oId, Long authOrganizationId);

    List<LessonClass> findLessonClassByClassIds(List<Long> classIds);

    List<LessonClassVo> findLessonClassByOrganId(Long organId);

    int countLessonClassByLessonIdTrimesterIdStatus(Long lessonId, Long baseTrimesterId, Integer status);

    void updateLessonClassStatus();

    /**
     * 删除班级讲次
     * @param id
     * @return
     */
	ResBoolSimpleInfo<String> delLesCha(Long id);

    List<String> findOrgUseByLess(Long lessonId);

    List<String> findClassNameByLess(Long lessonId);
    
    /**
     * 找出需要同步的班级学生
     * @return
     */
    List<LessonClass> findNeedSycnClassStudent(String startTime);

    ResBoolSimpleInfo<LessonClassPage> findLessonClassByTeacher(Long teacherId,
                                             Long schoolId,
                                             Long trimesterId,
                                             Long sectionId,
                                             Long levelId,
                                             Integer pageSize,
                                             Integer pageIndex);

    LessonClassDTO findLessonClassByClassId(Long classId);

    /**
     * 根据班级ids 和班级状态查找班级
     * @param classIds
     * @return
     */
    List<LessonClass> findByClassIdsAndClassStatus(List<Long> classIds, Integer classStatus);

    ResBoolSimpleInfo<List<FeedbackClassesVo>> findFeedbackLessonClassByTeacher(Long teacherId, Long trimesterId);
}